package com.luych.oauth2Module.entitey;

import java.io.Serializable;

public class Oauth2Client implements Serializable {
    private String clientId;

    private String clientSecret;

    private String redirectUrl;

    private String grantType;

    private String grantScopeIds;

    private static final long serialVersionUID = 1L;

    public Oauth2Client(String clientId, String clientSecret, String redirectUrl, String grantType, String grantScopeIds) {
        this.clientId = clientId;
        this.clientSecret = clientSecret;
        this.redirectUrl = redirectUrl;
        this.grantType = grantType;
        this.grantScopeIds = grantScopeIds;
    }

    public Oauth2Client() {
        super();
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId == null ? null : clientId.trim();
    }

    public String getClientSecret() {
        return clientSecret;
    }

    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret == null ? null : clientSecret.trim();
    }

    public String getRedirectUrl() {
        return redirectUrl;
    }

    public void setRedirectUrl(String redirectUrl) {
        this.redirectUrl = redirectUrl == null ? null : redirectUrl.trim();
    }

    public String getGrantType() {
        return grantType;
    }

    public void setGrantType(String grantType) {
        this.grantType = grantType == null ? null : grantType.trim();
    }

    public String getGrantScopeIds() {
        return grantScopeIds;
    }

    public void setGrantScopeIds(String grantScopeIds) {
        this.grantScopeIds = grantScopeIds == null ? null : grantScopeIds.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", clientId=").append(clientId);
        sb.append(", clientSecret=").append(clientSecret);
        sb.append(", redirectUrl=").append(redirectUrl);
        sb.append(", grantType=").append(grantType);
        sb.append(", grantScopeIds=").append(grantScopeIds);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}